#include <iostream>
#include <unistd.h>
#include <stdlib.h>
extern char** environ;
using namespace std;
int main()
{
pid_t pid=fork();
if(pid>0)
{
  //父进程
  while(1)
  {


  }
}
else
{
  //子进程
putenv("val=100");
char* arr[]={"v1=100,v2=200"};
execle("/home/lnb/linux-l/review/11_28/test","test",NULL,arr);
cout<<"替换错误"<<endl;

}


  return 0;
}
